<template>
  <el-dialog
    v-el-drag-dialog
    title="足迹信息"
    width="60%"
    :close-on-click-modal="false"
    :visible.sync="visible">
    <el-table
      ref="table"
      :data="dataList"
      border
      v-loading="dataListLoading"
      style="width: 100%;">
      <el-table-column
        width="170"
        prop="ww"
        label="浏览人名称"
        header-align="center"
        align="center">
      </el-table-column>
      <!--<el-table-column
        prop="goodsType"
        label="商品浏览类型"
        header-align="center"
        align="center">
      </el-table-column>-->
      <!--<el-table-column
        prop="被浏览店铺名称"
        label="被浏览店铺名称"
        header-align="center"
        align="center">
      </el-table-column>-->
      <el-table-column
        prop="browseType"
        label="浏览类型"
        header-align="center"
        align="center">
      </el-table-column>
      <el-table-column
        prop="lastBrowseTime"
        label="最后浏览时间"
        header-align="center"
        align="center">
      </el-table-column>
      <el-table-column
        prop="browseTimes"
        label="浏览次数"
        header-align="center"
        align="center">
      </el-table-column>
    </el-table>
    <span slot="footer" class="dialog-footer">
        <el-button @click="visible = false">取消</el-button>
    </span>
  </el-dialog>
</template>

<script>
  export default {
    data: function () {
      return {
        startTime: '',
        endTime: '',
        keywords: '',
        visible: false,
        dataListLoading: false,
        dataList: [],
        checkFlag: false
      }
    },
    methods: {
      init (id) {
        debugger
        this.visible = true
        this.dataListLoading = true
        this.$http({
          url: this.$http.adornUrl(`/browse/getShoppingBrowseById/${id}`),
          method: 'get',
          data: this.$http.adornData()
        }).then(({data}) => {
          if (data && data.code === 0) {
            this.dataList = data.data
          } else {
            this.$message.error(data.msg)
          }
          this.dataListLoading = false
        })
      }
    }
  }
</script>
